<template>
    <div class="navMenu">
        <template v-for="data in menuList">
            <!-- 最后一级菜单 -->
            <el-menu-item v-if="!data.childSysMenu&&navMenu"
                          :key="data.menu_id" :data="data" :index="String(menu_id)"
            >
                <!--图标-->
                <!--<i :class="data.entity.icon"></i>-->
                <span slot="title">{{data.name}}</span>
            </el-menu-item>

            <!-- 此菜单下还有子菜单 -->
            <el-submenu v-if="data.childSysMenu&&data"
                        :key="data.menu_id" :data="data" :index="String(data.menu_id)">
                <template slot="title">
                    <!--<i :class="navMenu.entity.icon"></i>-->
                    <span> {{data.name}}</span>
                </template>
                <!-- 递归 -->
                <NavMenu :navMenus="data.chileSysMenu"></NavMenu>
            </el-submenu>
        </template>
    </div>
</template>
<script>
    export default {
        name: 'NavMenu',
        props: ['navMenus'],
        data() {
            return {
                menuList:null
            }
        }
    }
</script>
<style>

</style>